﻿/*****************************
**     Popup message
******************************/

//close pop-up box
function closePopup() {
    $('#opaco').toggleClass('hidden').removeAttr('style');
    $('#popup').toggleClass('hidden');
    return false;
}

//open pop-up
function showPopup(popup_type) {
    //when IE - fade immediately
    if ($.browser.msie) {
        $('#opaco').height($(document).height()).toggleClass('hidden');
    }
    else
    //in all the rest browsers - fade slowly
    {
        $('#opaco').height($(document).height()).toggleClass('hidden').fadeTo('slow', 0.7);
    }

    $('#popup')
     .html($('#popup_' + popup_type).html())
     .alignCenter()
     .toggleClass('hidden');

    return false;
}
